package com.nightsoul.cxf.interceptor.in;


import javax.xml.stream.XMLStreamReader;

import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;

public class ReadInterceptor extends AbstractPhaseInterceptor<Message> {

	public ReadInterceptor() {
		super(Phase.READ);
	}
	
	@Override
	public void handleMessage(Message message) throws Fault {
		System.out.println(this.getClass().getName());
		XMLStreamReader reader = message.getContent(XMLStreamReader.class);
		System.out.println(reader);
	}

}
